package cn.chinaflame.pagodas.entity;

import java.util.Objects;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "pa_bad_lights", schema = "pagoda", catalog = "")
public class PaBadLights {

    private String id;
    private String lightno;//灯号
    private String createtime;//创建时间
    private String message;//C#接口检测返回msg
    private int result;//C#接口检测返回result 0,1
    @Id
    @Column(name = "id", nullable = false, length = 20)
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }
 
    @Basic
    @Column(name = "lightno", nullable = true, length = 200)
	public String getLightno() {
		return lightno;
	}

	public void setLightno(String lightno) {
		this.lightno = lightno;
	}
    @Basic
    @Column(name = "message", nullable = true, length = 200)
	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

    @Basic
    @Column(name = "createtime", nullable = true, length = 200)
	public String getCreatetime() {
		return createtime;
	}

	public void setCreatetime(String createtime) {
		this.createtime = createtime;
	}
	 @Basic
	    @Column(name = "result")
	public int getResult() {
		return result;
	}

	public void setResult(int result) {
		this.result = result;
	}

	public String toString() {
		StringBuffer tos = new StringBuffer();
		return tos.append("lightno=").append(lightno).append("&message=").append(message).append("&createtime=").append(createtime).append("&result=").append(result).toString();
	}

	@Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        PaBadLights that = (PaBadLights) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(lightno, that.lightno) &&
                Objects.equals(createtime, that.createtime) &&
                Objects.equals(message, that.message);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, lightno,message,createtime);
    }

}
